package com.joysuch.wwyt.edu.controller;

import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.edu.bean.EduTrainningRecordQueryBean;
import com.joysuch.wwyt.edu.bean.EduTrainningRecordQueryDto;
import com.joysuch.wwyt.edu.service.EduCourtTrainningRecordService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 描述：线上线下教育记录
 *
 * @author Eric
 * @since 2022-07-05
 */
@RestController
@RequestMapping("/edu/court-trainning-record")
public class EduCourtTrainningRecordController {
    @Autowired
    private EduCourtTrainningRecordService eduCourtTrainningRecordService;

    @PostMapping("course-record-query-page")
    @ApiOperation(value = "线上线下教育分页查询", response = EduTrainningRecordQueryDto.class)
    @ResponseBody
    public ResultBean courseRecordQueryPage(@RequestBody EduTrainningRecordQueryBean bean) {
        return eduCourtTrainningRecordService.courseRecordQueryPage(bean);
    }
    @GetMapping("course-record-excel")
    @ApiOperation("线上线下教育教育记录excel导出")
    public void courseRecordExcel(EduTrainningRecordQueryBean param, HttpServletRequest request, HttpServletResponse response) {
        eduCourtTrainningRecordService.courtRecordExcel(param, request, response);
    }

}
